home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10370 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: rcp6.elan.af.mil!rscernix!danpop
  2. From: danpop@mail.cern.ch (Dan Pop)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: quotes in sscanf() ????????????
  5. Date: 13 Mar 96 22:39:21 GMT
  6. Organization: CERN European Lab for Particle Physics
  7. Message-ID: <danpop.826756761@rscernix>
  8. References: <4i757h$pkc@jeeves.niehs.nih.gov>
  9. NNTP-Posting-Host: ues5.cern.ch
  10. X-Newsreader: NN version 6.5.0 #7 (NOV)
  11.  
  12. In <4i757h$pkc@jeeves.niehs.nih.gov> duling@niehs.nih.gov (Dave Duling) writes:
  13.  
  14.  
  15. >Hi.  I need to read in ASCII files of the for:
  16.                         ^^^^^
  17. The character set is irrelevant to your problem.
  18.  
  19. >#.##,"string with , commas and spaces ", etc....
  20. >
  21. >so the delimiter is a comma, the string is bound by quotes and contains both 
  22. >commas and spaces (but no other quotes).  So I've played around endlessly with
  23. >this but have not found the answer.  I could write a special function but it 
  24. >would be more eloquent with a standard IO call to sscanf()....
  25.  
  26. Then, just use [fs]scanf().  If you don't know how, open your C book.
  27. You'll find the answer there.
  28.  
  29. Dan
  30. --
  31. Dan Pop
  32. CERN, CN Division
  33. Email: danpop@mail.cern.ch 
  34. Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
  35.